//
//  StateView.m
//  FastDoctor
//
//  Created by 程建良 on 16/7/6.
//  Copyright © 2016年 sc. All rights reserved.
//

#import "StateView.h"
@interface StateView()
@property (nonatomic,strong)UIImageView *imageView;
@property (nonatomic,strong)UILabel *label;
@end
@implementation StateView
-(instancetype)init{
    if (self = [super init]) {
        [self setupUI];
    }
    return self;
}
-(void)setupUI{
    self.imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"yj"]];
    self.label = [[UILabel alloc]init];
    self.label.text = @"名医通";
    self.label.textColor = [UIColor blackColor];
    [self.label sizeToFit];
    [self addSubview:self.imageView];
    [self addSubview:self.label];
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.imageView.frame = CGRectMake(5, 5, self.imageView.frame.size.width, self.imageView.frame.size.height);
    self.label.frame = CGRectMake(self.imageView.frame.size.width+10, 5, self.label.frame.size.width, self.label.frame.size.height);
}
@end
